<?php
require 'class/control.class.php';
$ins  = new Control('listar','institucional','');
$ins->Consult();
$ins_res = $ins->result->lista;
//print_r($ins_res);
?>
<!DOCTYPE html>
<html lang="pt-br">
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<meta name="viewport" content="width=1280px, initial-scale=1, maximum-scale=1">
		<link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'>
		<link href='assets/css/bootstrap.min.css' rel='stylesheet' type='text/css'>
		<link href='assets/css/style.less' rel='stylesheet/less' type='text/css'>
	</head>
	<body>
		<header>	
			<div class="header-in">				
				<h1><a href="index.html"><img src="assets/images/logo_pos.png"></a></h1>
				<h2>
					51 3336.2003
					<span>aludmax@aludmax.com.br</span>
				</h2>
			</div>
		</header>
		<section id="home" class="page-resize cycle-slideshow slider">
			<li style="background-image: url(assets/images/slider_1.jpg);background-size: cover;">
				<div class="highlight">
					Uma grande obra é feita com ideias,<br/>determinação e, principalmente, gente
				</div>
			</li>				
		</section>
		<nav class="navigation" >			
			<h1 class="logo"><img src="assets/images/logo_b.png" /></h1>
			<ul class="menu">	
				<li><a href="#" data-id="empresa" class="navscroll">EMPRESA</a></li>
				<li><a href="#" data-id="produtos" class="navscroll">PRODUTOS</a></li>
				<li><a href="#" data-id="servicos" class="navscroll">SERVIÇOS</a></li>
				<li><a href="#" data-id="projetos" class="navscroll">PROJETOS REALIZADOS</a></li>				
				<li><a href="#" data-id="clientes" class="navscroll">CLIENTES</a></li>
				<li><a href="#" data-id="videos" class="navscroll">VÍDEOS</a></li>
				<li><a href="#" data-id="contato" class="navscroll">CONTATO</a></li>
			</ul>
		</nav>
		<section id="empresa">
			<div class="pic" style="background:url(assets/images/institucional/<?php echo $ins_res[0]['imagem0']; ?>) no-repeat center;"></div>
			<div class="info">
				<h1><?php echo $ins_res[0]['titulo']; ?></h1>
				<p><?php echo $ins_res[0]['valor']; ?></p>
			</div>
		</section>
		<section id="produtos">
			<h1 class="center"><?php echo $ins_res[1]['titulo']; ?></h1>
			<p class="center"><?php echo strip_tags($ins_res[1]['valor']); ?></p>
			<ul>
				<?php
					$prod  = new Control('visualizar','produtos','');
					$prod->Consult();
					$prod_res = $prod->result->lista;
					foreach ($prod_res as $item) {
						echo '<li>';
							echo '<a href="assets/images/produtos/',$item['imagem0'],'" rel="produtos" class="fancybox">';
								echo '<img src="assets/images/produtos/',$item['imagem0'],'" />';
								echo '<div class="layer">',$item['nome'],'</div>';
							echo '</a>';
						echo '</li>';
					}
				?>
			</ul>
		</section>
		<section id="servicos">
			<div class="pic"><img src="assets/images/institucional/<?php echo $ins_res[2]['imagem0']; ?>" /></div>
			<div class="info">
				<h1><?php echo $ins_res[2]['titulo']; ?></h1>
				<p><?php echo $ins_res[2]['valor']; ?></p>
			</div>
		</section>
		<section id="projetos">
			<h1 class="center">Projetos realizados</h1>
			<?php
				$proj  = new Control('visualizar','projetos','');
				$proj->Consult();
				$proj_res = $proj->result->lista;
				foreach ($proj_res as $item) {
					echo '<div class="item">';
						echo '<a href="assets/images/projetos/',$item['imagem0'],'" rel="projetos" class="fancybox">';
							echo '<img src="assets/images/projetos/',$item['imagem0'],'" />';
						echo '</a>';
						echo '<p>',$item['texto'],'</p>';
					echo '</div>';
				}
			?>
		</section>
		<section id="clientes">
			<h1 class="center">Clientes</h1>
			<?php
				$clientes  = new Control('visualizar','clientes','');
				$clientes->Consult();
				$clientes_res = $clientes->result->lista;
				foreach ($clientes_res as $item) {
					echo '<div class="item">';
						echo '<img src="assets/images/clientes/',$item['imagem0'],'" />';			
					echo '</div>';
				}
			?>
		</section>
		<section id="videos">
			<h1 class="center">Vídeos</h1>
			<?php
				$videos  = new Control('visualizar','videos','');
				$videos->Consult();
				$videos_res = $videos->result->lista;
				$url = explode('=',$videos_res['link']);				
			?>
			<iframe width="100%" height="600" src="//www.youtube.com/embed/<?php echo $url[1]; ?>?rel=0" frameborder="0" allowfullscreen></iframe>			
		</section>
		<section id="contato">
			<h1 class="center">Contato</h1>
			<div class="pic">
				<iframe src="https://www.google.com/maps/embed?pb=!1m14!1m8!1m3!1d3452.9800720120256!2d-51.1854502!3d-30.066105699999998!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x951982a9e8c2864d%3A0xeb435f550aa626f1!2sAv.+Veiga%2C+120+-+Cel.+Apar%C3%ADcio+Borges%2C+Porto+Alegre+-+RS%2C+91510-120!5e0!3m2!1spt-BR!2sbr!4v1418315056373" width="600" height="450" frameborder="0" style="border:0"></iframe>
			</div>
			<div class="info">				
				<img src="assets/images/logo.png" />
				<span>Endereço</span><br />
				<?php echo $ins_res[3]['valor']; ?>				
			</div>
			<br clear="all" />
		</section>
		<script type="text/javascript" src="assets/js/jquery.js"></script>
		<script type="text/javascript" src="assets/js/less.js"></script>
		<script type="text/javascript" src="assets/js/app.js"></script>
		<link rel="stylesheet" href="fancybox/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
		<script type="text/javascript" src="fancybox/jquery.fancybox.pack.js?v=2.1.5"></script>
	</body>
</html>